package exit.manboking.service;

import android.util.Log;
import exit.manboking.common.Code;

public class values {

	private int Step = 0;
	private static values values;
	private int goalStep = Code.DEFAULT_GOAL_STEP;
	
	
	public int getGoalStep() {
		return goalStep;
	}

	public void setGoalStep(int goalStep) {
		this.goalStep = goalStep;
	}

	public static values getValues(){
		if(values==null){
			values = new values();
		}
		return values;
	}

	public int getStep() {
		return Step;
	}

	public void setStep(int step) {
		Step = step;
	}

	public void clearStep(){
		Step = 0;
	}
	
	public void incrementStep(){
		Step++;
	}
	
	public String getCalorie(){
		return ""+ (Float.valueOf(values.getStep()) * Code.CODE_STEP_CONSUME_CALRORIE) / Code.CODE_KCALRORIE;
	}
	
	public String getGoalSuccessRate(){
		String temp = String.valueOf( 100 * (((getStep() == 0 ) ? 1 : getStep())) / goalStep);
		Log.i("MYLOG","suucessrate :"+temp);
		return temp;
	}
}
